3.17 \(\int (a+b \sec ^2(e+f x))^2 \sin (e+f x) \, dx\)

Optimal. Leaf size=46 \[ -\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

[Out]

-((a^2*Cos[e + f*x])/f) + (2*a*b*Sec[e + f*x])/f + (b^2*Sec[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0354167, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {4133, 270} \[ -\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x],x]

[Out]

-((a^2*Cos[e + f*x])/f) + (2*a*b*Sec[e + f*x])/f + (b^2*Sec[e + f*x]^3)/(3*f)

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \left (a+b \sec ^2(e+f x)\right )^2 \sin (e+f x) \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{\left (b+a x^2\right )^2}{x^4} \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{\operatorname{Subst}\left (\int \left (a^2+\frac{b^2}{x^4}+\frac{2 a b}{x^2}\right ) \, dx,x,\cos (e+f x)\right )}{f}\\ &=-\frac{a^2 \cos (e+f x)}{f}+\frac{2 a b \sec (e+f x)}{f}+\frac{b^2 \sec ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.114327, size = 75, normalized size = 1.63 \[ \frac{4 \sec ^3(e+f x) \left (a \cos ^2(e+f x)+b\right )^2 \left (-3 a^2 \cos ^4(e+f x)+6 a b \cos ^2(e+f x)+b^2\right )}{3 f (a \cos (2 (e+f x))+a+2 b)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sec[e + f*x]^2)^2*Sin[e + f*x],x]

[Out]

(4*(b + a*Cos[e + f*x]^2)^2*(b^2 + 6*a*b*Cos[e + f*x]^2 - 3*a^2*Cos[e + f*x]^4)*Sec[e + f*x]^3)/(3*f*(a + 2*b
+ a*Cos[2*(e + f*x)])^2)

________________________________________________________________________________________

Maple [A]  time = 0.028, size = 42, normalized size = 0.9 \begin{align*}{\frac{1}{f} \left ({\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{3}{b}^{2}}{3}}+2\,ab\sec \left ( fx+e \right ) -{\frac{{a}^{2}}{\sec \left ( fx+e \right ) }} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sec(f*x+e)^2)^2*sin(f*x+e),x)

[Out]

1/f*(1/3*sec(f*x+e)^3*b^2+2*a*b*sec(f*x+e)-a^2/sec(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 0.975928, size = 57, normalized size = 1.24 \begin{align*} -\frac{3 \, a^{2} \cos \left (f x + e\right ) - \frac{6 \, a b}{\cos \left (f x + e\right )} - \frac{b^{2}}{\cos \left (f x + e\right )^{3}}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e),x, algorithm="maxima")

[Out]

-1/3*(3*a^2*cos(f*x + e) - 6*a*b/cos(f*x + e) - b^2/cos(f*x + e)^3)/f

________________________________________________________________________________________

Fricas [A]  time = 0.484566, size = 104, normalized size = 2.26 \begin{align*} -\frac{3 \, a^{2} \cos \left (f x + e\right )^{4} - 6 \, a b \cos \left (f x + e\right )^{2} - b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e),x, algorithm="fricas")

[Out]

-1/3*(3*a^2*cos(f*x + e)^4 - 6*a*b*cos(f*x + e)^2 - b^2)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)**2)**2*sin(f*x+e),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.2744, size = 63, normalized size = 1.37 \begin{align*} -\frac{a^{2} \cos \left (f x + e\right )}{f} + \frac{6 \, a b \cos \left (f x + e\right )^{2} + b^{2}}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sec(f*x+e)^2)^2*sin(f*x+e),x, algorithm="giac")

[Out]

-a^2*cos(f*x + e)/f + 1/3*(6*a*b*cos(f*x + e)^2 + b^2)/(f*cos(f*x + e)^3)